<template>
  <a-tabs
    type="card"
    :active-key="activeTabKey"
    @change="handleTabChange"

  >
    <a-tab-pane :key="1">
      <span slot="tab" style="marginTop:-10px">
        &nbsp;<span class="tab-text">项目</span>
      </span>

      <ModelTree :visible="activeTabKey===1" />
    </a-tab-pane>
    <a-tab-pane :key="2">
      <span slot="tab" style="marginTop:-10px">
        <span class="tab-text">图表</span>
      </span>

      <DiagramTree :visible="activeTabKey===2"  />
    </a-tab-pane>
    <a-tab-pane :key="3">
      <span slot="tab" style="marginTop:-10px">
        <span class="tab-text">结构</span>
      </span>

      <!--      <ModelTree :visible="activeTabKey===3"  />-->
    </a-tab-pane>
  </a-tabs>
</template>

<script>
import ModelTree from './ModelTree/ModelTree';
import DiagramTree from './ModelTree/DiagramTree';
export default {
  name: 'sider-tab',
  components: { DiagramTree, ModelTree },
  props: {},
  data() {
    return {
      activeTabKey: 1

    };
  },
  methods: {

    handleTabChange(val) {
      this.activeTabKey = val;
    }
  }
};
</script>

<style lang="scss" scoped>
.tab-container {
  display: flex;
  flex-direction: row;
  .tab-item {
    flex: 1;
    text-align: center;
    color: #333;
    font-size: 10px;
    padding: 5px 10px;
    background-color: #fff;
    /*border: 1px solid #ccc;*/
    &.active {
      font-weight: bold;
    }
  }
}
.pane-title {
  background-color: #f1f4f6;
  width: 100%;
  height: 32px;
  .search {
    margin-top: 5px;
    margin-left: 11px;
    width: 161px;
  }
  .tree-arrow {
    margin-top: -6px;
    margin-left: 8px;
  }
  .tree-favor {
    margin-top: -6px;
    margin-left: 8px;
  }
}
</style>
<style lang="scss">
//// todo 此处有全局样式影响，后面要去掉
.tab-text {
  font-size: 12px;
  line-height: 16px;
}

.search {
  width: 90% !important;
  font-size: 12px !important;
  font-family: 'Helvetica Neue', Arial, 'PingFang SC','Microsoft YaHei';
  color: rgba(0, 0, 0, 0.25);
  line-height: 22px;
}

.pane-title {
  border-bottom: 1px solid rgba(153, 177, 197, 1);
}

</style>
<style>
/* .ant-tabs-tab {
  height: 18px !important;
  font-size: 10px !important;
}
.ant-tabs-tab-active {
  height: 18px !important;
  font-size: 10px !important;
} */

</style>
<style lang="scss" scoped>
/deep/.input-select .ant-input {
  height: 22px !important;
}
/deep/ .ant-tabs-tabpane {
    height: calc(100% - 0px);
  }
</style>
